Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Kotlin 1.9 #509

Merged
merged 13 commits into from
Feb 13, 2024
Merged

Upgrade to Kotlin 1.9 #509

merged 13 commits into from
Feb 13, 2024

Conversation

dpad85
Copy link
Member

@dpad85 dpad85 commented Jan 22, 2024

This PR upgrades kotlin to version 1.9, which has side effects :

  • upgrading gradle ;
  • upgrading several libraries, including secp256k1, lightning-kmp ;
  • updating the gradle config ;
  • removing obsolete libraries and cleaning up code (see LogMemory).

It also brings several improvements:

Libraries update

  • ktor upgraded to 2.3.7
  • kotlinx.coroutines to 1.7.3
  • kotlinx.serialization to 1.6.2

⚠️ lightning-kmp is using a development version.

About iosSimulatorArm64

The iosSimulatorArm64 target has been removed for now as it's not yet supported by tor-mobile-kmp.

Removing LogMemory

The kodein-memory library has also been removed. This library was used to write the logs to disk in the shared module. However we were using an old version, and we are already planning to move to another log library and to delegate writing logs to disk to the application layer (*).

So it's not worth spending time upgrading this library ; instead this dependency is removed, and the code has be cleaned up:

  • removed LogMemory
  • removed usage of APIs from this lib (freeze calls)
  • removed most code from the LogConfiguration controller, which will have to be removed altogether at some point

(*) I think that delegating writing logs to disk should help with performances.

Several libraries have been upgraded:
- ktor to 2.3.7
- kotlinx.coroutines to 1.7.3
- kotlinx.serialization to 1.6.2

tor-mobile-kmp and secp256k1 have been also upgraded to
development version using kotlin 1.9 (we'll use tags
before this commit is merged to master).

Note: the `iosSimulatorArm64` target has been removed for
now as it's not yet supported by tor-mobile-kmp. This will
be reverted once the tor library is fixed.

The kodein-memory library has also been removed. This
library was used to write the logs to disk in the shared
module. However we were using an old version, and we are
already planning to move to another log library and to
delegate writing logs to disk to the application layer.
It's not worth spending time upgrading ; instead this
dependency is removed, and the code should be cleaned up:

-> removed LogMemory
-> removed usage of APIs from this lib (freeze calls)
-> remove most code from the LogConfiguration controller
   which has to be removed (will be done in another commit
   as the UI would be impacted)
Also target api 34 in the Android apps.
Using kotlin 1.9 requires the Android dependencies to
upgrade as well.
@dpad85 dpad85 marked this pull request as ready for review February 12, 2024 13:33
@dpad85
Copy link
Member Author

dpad85 commented Feb 12, 2024

Note: we're having CI issue with tor-mobile-kmp 1.9 so we won't upgrade this library now, it will be done later in a future PR.

These dependencies are resolved transitively.
@dpad85 dpad85 merged commit d0bac08 into master Feb 13, 2024
@dpad85 dpad85 deleted the kotlin-1.9 branch February 13, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants